import {defineStore} from 'pinia'

export const userManagerStore = defineStore({
    id: 'userManager',
    state: () => ({
        queryParams: {
            name: null,
            departmentIds: [],
            departmentId: null,
            sortColumn: "created desc",
        },
    }),
    getters: {},
    actions: {
        updateDepartmentId() {
            this.queryParams.departmentId = this.queryParams.departmentIds[this.queryParams.departmentIds.length - 1]
        }
    }
})
